package cn.brilliantfuture.commentry.entity;

// Generated 2013-6-28 10:01:44 by Hibernate Tools 3.3.0.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

/**
 * EmailRecord generated by hbm2java
 */
@Entity
@Table(name = "email_record", catalog = "cabinet")
public class EmailRecord implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer emailRecordId;
	private String email;
	private String title;
	private String content;
	private Date insertTime;
	private boolean isSend;

	public EmailRecord() {
	}

	public EmailRecord(String email, String title, String content,
			Date insertTime, boolean isSend) {
		this.email = email;
		this.title = title;
		this.content = content;
		this.insertTime = insertTime;
		this.isSend = isSend;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "email_record_id", unique = true, nullable = false)
	public Integer getEmailRecordId() {
		return this.emailRecordId;
	}

	public void setEmailRecordId(Integer emailRecordId) {
		this.emailRecordId = emailRecordId;
	}

	@Column(name = "email", nullable = false, length = 100)
	@NotNull
	@Length(max = 100)
	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "title", nullable = false, length = 100)
	@NotNull
	@Length(max = 100)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content", nullable = false, length = 500)
	@NotNull
	@Length(max = 500)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "insert_time", nullable = false, length = 19)
	@NotNull
	public Date getInsertTime() {
		return this.insertTime;
	}

	public void setInsertTime(Date insertTime) {
		this.insertTime = insertTime;
	}

	@Column(name = "is_send", nullable = false)
	public boolean isIsSend() {
		return this.isSend;
	}

	public void setIsSend(boolean isSend) {
		this.isSend = isSend;
	}

}
